package com.event.demo.service;

import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @author hh
 * @since 2023/3/29
 */
@Component
public class ListenerEvent {

    @EventListener({UserChangePasswordEvent.class})
    public void LogListener(UserChangePasswordEvent event) {
        System.out.println("1.@EventListener收到事件：" + event);
    }

    @EventListener({ UserChangePasswordEvent.class })
    public void messageListener(UserChangePasswordEvent event) {
        System.out.println("2.@EventListener收到事件:" + event);
    }

}
